//
//  MVAllKindsCollectionReusableView.m
//  NewMusic
//
//  Created by dllo on 15/11/21.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "MVAllKindsCollectionReusableView.h"
#import "UIView+WJLSetBaseView.h"
@interface MVAllKindsCollectionReusableView ()
@property(nonatomic, retain) UILabel *nameLabel;
@end

@implementation MVAllKindsCollectionReusableView
-(void)dealloc {
    [_titleString release];
    [_nameLabel release];
    [super dealloc];
}
-(instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        //创建视图
        [self createSubView];
    }
    return self;
}
#pragma mark 创建视图
-(void)createSubView {
    //标题
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 5, 50, self.height - 10)];
//    _nameLabel.backgroundColor =[UIColor redColor];
    _nameLabel.textColor = [UIColor whiteColor];
    _nameLabel.font = [UIFont systemFontOfSize:20];
    [self addSubview:_nameLabel];
    [_nameLabel release];
}
#pragma mark 重写titleString的setter方法
-(void)setTitleString:(NSString *)titleString {
    if (_titleString != titleString) {
        [_titleString release];
        _titleString = [titleString copy];
    }
    _nameLabel.text = titleString;
}
@end
